package com.assist.dao.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

import com.assist.dao.ICategoryDAO;
import com.assist.model.Category;
import com.assist.model.User;
import com.assist.util.HibernateUtil;

public class CategoryDAOImpl implements ICategoryDAO {

	@Override
	public List<Category> getCategories() {
		Session session = HibernateUtil.getSessionFactory().getCurrentSession();
		Criteria criteria = session.createCriteria(Category.class);
		List results = criteria.list();
		return (List<Category>) results;
	}

}
